package com.blb.ioc;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class ComputerDemo3 {

    public static void main(String[] args) {
        //注解配置的应用程序上下文
        AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext(ComputerConfig.class);
        //获得对象
        Computer computer = context.getBean(Computer.class);
        computer.start();
    }
}
